<template>
  <el-card>
    <div slot="header" class="el-card-header">
      <div class="el-card-left">
        <div class="el-card-search">
          <el-input v-model="content" placeholder="请输入内容" class="input-with-select">
            <el-button slot="append" class="el-card-search-btn">搜索</el-button>
          </el-input>
        </div>
      </div>
      <div class="el-card-right">
        <el-tag effect="plain" @click.native="moreSelect">更多筛选项 <i ref="elTag" :class="rotate? 'gorotate': 'norotate' " class="el-icon-caret-bottom" /> </el-tag>
      </div>
    </div>
    <div v-if="!rotate" class="orderStatus">
      <div>
        订单状态：
        <el-select v-model="value" placeholder="请选择">
          <el-option
            v-for="item in options1"
            :key="item.value"
            :label="item.label"
            :value="item.value"
            :disabled="item.disabled"
          />
        </el-select>
      </div>
      <div>
        评价状态：
        <el-select v-model="value" placeholder="请选择">
          <el-option
            v-for="item in options1"
            :key="item.value"
            :label="item.label"
            :value="item.value"
            :disabled="item.disabled"
          />
        </el-select>
      </div>
      <div>
        支付方式：
        <el-select v-model="value" placeholder="请选择">
          <el-option
            v-for="item in options1"
            :key="item.value"
            :label="item.label"
            :value="item.value"
            :disabled="item.disabled"
          />
        </el-select>
      </div>
    </div>
  </el-card>
</template>

<script>
export default {
  name: 'OrderSearch',
  props: {
    options1: {
      type: Array,
      default: () => []
    },
    value: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      rotate: false,
      content: ''
    }
  },
  methods: {
    moreSelect() {
      this.rotate = !this.rotate
    }
  }
}
</script>

<style lang="scss" scoped>
.el-card{
  width: 1200px;
  margin-top: 20px;
  line-height: 60px;
 .el-card-header{
  display: flex;
  align-items: center;
  .el-card-left{
    width: 500px;
      ::v-deep.el-input__inner{
        height: 30px !important;
        line-height: 30px !important;
      }
      .el-card-search-btn{
          background-color: #438dee;
          color: #fff;
          border-radius: 0 4px 4px 0;
          border: 1px solid #438dee;
          vertical-align: middle;
          height: 30px;
          line-height: 0 !important;
        }
    }
    .el-card-right{
      margin-left: 50px;
    }
  }
  ::v-deep.el-card__body{
    padding: 0;
  }
}
.norotate{
    transition: all .3s;
}
.gorotate{
    transform:rotate(-180deg);
    transition: all .3s;
}
.orderStatus{
  display: flex;
  align-items: center;
  justify-content: space-around;
}
</style>
